{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="content"}
<div class="t-n-s-top">
    <div class="tables-searchbox">
        <form method="post">
            <div class="mgt10">
                <span class="tbs-txt">添加时间：</span>
                <input type="text" autocomplete="off" class="Wdate" name="start_date" value="{$start_date|date_format:'%Y-%m-%d'}"  onclick="WdatePicker()">
                <span class="tbs-txt">至</span>
                <input type="text" autocomplete="off" class="Wdate" name="end_date" value="{$end_date|date_format:'%Y-%m-%d'}"  onclick="WdatePicker()">
                <input type="hidden" name="act" value="search">
                <button type="submit" class="btn"><i class="gicon-search"></i>搜索</button>
            </div>

        </form>
    </div>

    <div class="t-month-chart" id="container">
    </div>
</div>
{/block}

{block name="js"}
<script type="text/javascript" src="/Public/Plugins/Highcharts/highcharts.js?version={$version}"></script>
<script src="/Public/Plugins/My97DatePicker/WdatePicker.js?version={$version}"></script>

<script>
    var source_name = new Array();
    var i = 0;
    var source_value = new Array();
    {foreach from=$source_list item = item}

        source_name[i] = '{$item.source_name}'
        source_value[i] =  {$item.count}
        i++;
    {/foreach}


</script>


{literal}
<script type="text/javascript">
    $(function () {
        $('#container').highcharts({
            chart: {
                type: 'column'
            },
            title: {
                text: '渠道来源统计'
            },
            subtitle: {
                //text: '数据来源: WorldClimate.com'
            },
            xAxis: {
                categories: source_name,
                crosshair: true
            },
            yAxis: {
                min: 0,
                title: {
                    text: '次数 '
                }
            },
            tooltip: {
                headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                pointFormat: '' +
                '<td style="padding:0;font-size: 10px;"><b>次数:{point.y}</b></td></tr>',
                footerFormat: '</table>',
                shared: true,
                useHTML: true
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0
                }
            },
            series: [{
                name: '客户来源类型',
                data: source_value
            }]
        });
    });

</script>
{/literal}
{/block}

{block name="css"}
<link rel="stylesheet" href="/Public/Css/acp/AcpOrder/order_num_stat.css" type="text/css" />
{/block} 
